﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; 
using VisualJS;
using VisualJS.Web.Forms;
using System.Linq;
using System.Text;

namespace VisualJSControlsSample.SampleForms
{
    public partial class TabsTest : VisualJS.Web.Forms.Form
    {

#region Constructors
        public TabsTest()
        {
            InitializeComponent();
            AfterInitialization();
        } 

        //Use the below constructor if you create the instance of this Form object other than the active Thread
        //otherwise you will receive "Cant locate the ClientID in active context. Consider using Form constructor with ClientID parameter" exception
        public TabsTest(string clientId): base(clientId)
        {
            InitializeComponent(); 
            AfterInitialization();
        }
#endregion

        //Use below method for the tasks after the initialization of the Form
        void  AfterInitialization()
        {

        }

        private void jButton1_Click(object sender, EventArgs e)
        {
            if (tabControl1.HeadersVisible)
                jButton1.Text = "Show Headers";
            else
                jButton1.Text = "Hide Headers";

            tabControl1.HeadersVisible = !tabControl1.HeadersVisible;
            comboBox1.Visible = !comboBox1.Visible;
            label1.Visible = !label1.Visible;
        }

        private void tabPage8_TabClosed(object sender, EventArgs e)
        {
            comboBox1.Items.RemoveAt(3);
        }
    }
}